package com.jilefojing.service;

import java.util.List;

import com.jilefojing.beans.enums.PlatformEnum;
import com.jilefojing.beans.exception.UserContextException;
import com.jilefojing.beans.pojos.Banner;
import com.jilefojing.beans.pojos.enhanced.EnhancedBanner;
import com.jilefojing.beans.query.BannerQuery;
import com.jilefojing.beans.vo.Pagination;
import com.jilefojing.beans.vo.UploadFile;
import com.jilefojing.context.beans.vo.UserContext;
import com.jilefojing.service.base.IBaseService;

/**
 * 
 * @author 作者 jgshun
 * @date 创建时间 2016年07月19日 13时23分08秒
 */
public interface IBannerService extends IBaseService<Banner> {

	Pagination<EnhancedBanner> getPaginationForActive(PlatformEnum platform, Pagination<EnhancedBanner> pagination, UserContext userContext);

	Pagination<EnhancedBanner> getPagination(BannerQuery bannerQuery, Pagination<EnhancedBanner> pagination, UserContext userContext);

	List<EnhancedBanner> appendEnhancedUser(List<EnhancedBanner> enhancedBanners, UserContext userContext);

	/**
	 * 修改 title,sort,startTime,endTime,url,status,platform
	 * 
	 * @param banner
	 * @param userContext
	 * @return
	 * @throws UserContextException
	 */
	Banner update(Banner banner, UserContext userContext) throws UserContextException;

	Banner add(Banner banner, UserContext userContext) throws UserContextException;

	Banner updateCover(long id, UploadFile coverUploadFile, UserContext userContext);

	void delete(long id, UserContext userContext) throws UserContextException;
}
